package com.example.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.pojo.siteInfoPojo;
import com.example.pojo.torqueManagePojo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * ClassName:torqueManageMapp
 * Description:
 *
 * @Author 赵永峰
 * @Create 2024/8/8 1:27
 * @Version 1.0
 */
@Mapper
public interface torqueManageMapp {
    //按照需求数量，查询出对应的条数，是用在指定了拧紧项目、机型、工序号、需求数量等信息后查询
    @DS("baodingRussia")
    @Select("select * from torque_manage where F_MEASURE_ID=#{project} and F_STATION_ID=#{op} and MODEL_ID=#{engineType} order by F_BEGIN_TIME DESC limit #{selectNum}")
    List<torqueManagePojo> inquiryDataTorque(int selectNum, String project, String op, String engineType);
    //向过站信息中查询数据：根据开始日期、终止日期，和一个机型的字符串，是一个数组形式，向过站信息中查询信息
    @DS("baodingRussia")
    @Select("select * from siteInfo where F_END_TIME>#{endDate} and F_END_TIME<=#{starDate} and F_PRODUCT_ID=#{type} and F_STATION_ID=#{op}")
    List<siteInfoPojo> siteInfoStartDateByEndDate(String starDate, String endDate, String type,String op);
}
